//
//  LogisticsListModel.swift
//  Pods
//
//  Created by eme on 2017/3/31.
//
//

import Foundation
import SwiftyJSON
import NetWorkCore
import ModelProtocol

class LogisticsListModel: ModelProtocol {
    
    // MARK: Declaration for string constants to be used to decode and also serialize.
    internal let kListStatusKey: String = "status"
    internal let kListTimeKey: String = "time"
    
    
    // MARK: 属性
    var status: String
    var time: String
    
    
    // MARK: 实现MikerSwiftJSONAble 协议， 解析json数据
    required  init?(json: JSON) {
        status = json[kListStatusKey].stringValue
        time = json[kListTimeKey].stringValue
        
    }
    
    
    /**
     Generates description of the object in the form of a NSDictionary.
     - returns: A Key value pair containing all valid values in the object.
     */
    internal func dictionaryRepresentation() -> [String : AnyObject ] {
        
        var dictionary: [String : AnyObject ] = [ : ]
        
            dictionary.updateValue(status as AnyObject, forKey: kListStatusKey)
        
            dictionary.updateValue(time as AnyObject, forKey: kListTimeKey)
        
        
        return dictionary
    }
    
    
}
